package YuanFuDao2;

/**
 * Excel表的列字母转换，输入第几列，输出列字母组合
 */
public class Main30 {
    public static void main(String[] args) {
        System.out.println(getString(28));
    }

    public static String getString(int n){
        if (n <= 0) {
            return "";
        }
        StringBuilder sb = new StringBuilder();
        while (n > 0) {
            n--;
            sb.append((char) (n % 26 + 'A'));
            n =n / 26;
        }
        return sb.reverse().toString();
    }
}
